/*********************************************
 * EIRMULATOR is under the beerware license.
 *
 * THE BEERWARE LICENSE (Revision 42):
 *
 * As long as you retain this notice you can
 * do whatever you want with this stuff. If we
 * meet some day, and you think this stuff is 
 * worth it, you can buy me a drink in return.
 */

#ifndef WORLD_H
#define WORLD_H

#include <ode/ode.h>

#include "configuration.h"

extern CConfiguration configuration;

class CWorld
{

  public:

  CWorld();
  ~CWorld();

  void init();
  void deinit();

  void doStep();

  static void collisionCallback( void* pData, dGeomID o1, dGeomID o2 );
  void collisionCallback( dGeomID o1, dGeomID o2 );

  public:
  /* Accessors */
  dSpaceID getSpace() {return this->space;};
  dWorldID getWorld() {return this->world;};
  

  private:

  dSpaceID space;

  dWorldID world;

  dJointGroupID contactgroup;

  dGeomID ground;

  dGeomID wall_N;
  dGeomID wall_S;
  dGeomID wall_W;
  dGeomID wall_E;



};

#endif // WORLD_H
